﻿<%@ Page Title="" Language="C#" MasterPageFile="~/pages/Main.Master" AutoEventWireup="true"
    CodeBehind="TvShows.aspx.cs" Inherits="Organizer.pages.TvShows" %>

<%@ Register Assembly="JotaControls" Namespace="JotaControls" TagPrefix="jcc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="tables">
        <tr>
            <td>
                <asp:Label ID="lblName" runat="server" Text="Name:"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
            </td>
            <td>
                <asp:Label ID="lblEpisodeNumber" runat="server" Text="Episode Number:"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtEpisodeNumber" runat="server"></asp:TextBox>
                <ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server"
                    FilterType="Numbers" TargetControlID="txtEpisodeNumber">
                </ajaxToolkit:FilteredTextBoxExtender>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblSeasonNumber" runat="server" Text="Season Number:"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtSeasonNumber" runat="server"></asp:TextBox>
                <ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server"
                    FilterType="Numbers" TargetControlID="txtSeasonNumber">
                </ajaxToolkit:FilteredTextBoxExtender>
            </td>
            <td>
                <asp:Label ID="lblLastViewedEpisode" runat="server" Text="Last Viewed Episode:"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtLastViewedEpisode" runat="server"></asp:TextBox>
                <ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server"
                    FilterType="Numbers" TargetControlID="txtLastViewedEpisode">
                </ajaxToolkit:FilteredTextBoxExtender>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblReleaseDay" runat="server" Text="Release Day:"></asp:Label>
            </td>
            <td>
                <asp:DropDownList ID="ddlReleaseDay" runat="server">
                    <asp:ListItem>Monday</asp:ListItem>
                    <asp:ListItem>Tuesday</asp:ListItem>
                    <asp:ListItem>Wednesday</asp:ListItem>
                    <asp:ListItem>Thursday</asp:ListItem>
                    <asp:ListItem>Friday</asp:ListItem>
                    <asp:ListItem>Saturday</asp:ListItem>
                    <asp:ListItem>Sunday</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td>
                <asp:Label ID="lblScore" runat="server" Text="Score:"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtScore" runat="server"></asp:TextBox>
                <ajaxToolkit:FilteredTextBoxExtender ID="ftextScore" runat="server" FilterType="Custom, Numbers"
                    ValidChars="." TargetControlID="txtScore">
                </ajaxToolkit:FilteredTextBoxExtender>
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                <%--  <asp:LinkButton ID="lnkSave" runat="server" CausesValidation="false" CssClass="LinkButtonStyle"
                    OnClick="lnkSave_Click">               
               <img src="../images/accept.png" alt="" />               
               Save</asp:LinkButton>
                &nbsp;<asp:LinkButton ID="lnkCancel" runat="server" CausesValidation="false" CssClass="LinkButtonStyle"
                    OnClick="lnkCancel_Click">               
               <img src="../images/bin.png" alt="" />               
               Cancel</asp:LinkButton>--%>
                <jcc:CustomButton ID="btnSave" runat="server" ButtonClass="Positive" ButtonText="Save"
                    OnClick="btnSave_Click" />
                <jcc:CustomButton ID="btnCancel" runat="server" ButtonClass="Negative" ButtonText="Cancel"
                    OnClick="btnCancel_Click" />
            </td>
            <td>
            </td>
            <td>
            </td>
        </tr>
    </table>
    <br />
    <div>
        <asp:GridView ID="grdTvShows" runat="server" CssClass="GridViewStyle" RowStyle-CssClass="RowStyle"
            SelectedRowStyle-CssClass="SelectedRowStyle" PagerStyle-CssClass="PagerStyle"
            AlternatingRowStyle-CssClass="AltRowStyle" HeaderStyle-CssClass="HeaderStyle"
            Width="100%" AutoGenerateColumns="False" PageSize="6" AllowPaging="True" OnRowCommand="grdTvShows_RowCommand"
            OnPageIndexChanging="grdTvShows_PageIndexChanging">
            <AlternatingRowStyle CssClass="AltRowStyle"></AlternatingRowStyle>
            <Columns>
                <asp:BoundField HeaderText="TvShowId" DataField="TvShowId" Visible="false" />
                <asp:BoundField HeaderText="Name" DataField="Name" />
                <asp:BoundField HeaderText="EpisodeNumber" DataField="EpisodeNumber" />
                <asp:BoundField HeaderText="SeasonNumber" DataField="SeasonNumber" />
                <asp:BoundField HeaderText="LastViewedEpisode" DataField="LastViewedEpisode" />
                <asp:BoundField HeaderText="ReleaseDay" DataField="ReleaseDay" />
                <asp:BoundField HeaderText="Score" DataField="Score" />
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:LinkButton ID="lnkEdit" CssClass="LinkButtonStyle" CausesValidation="false"
                            runat="server" CommandArgument='<%# Eval("TvShowId") %>' CommandName="Editar">               
               <img src="../images/pencil.png" alt="" />               
                        </asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:LinkButton ID="lnkDel" CssClass="LinkButtonStyle" CausesValidation="false" runat="server"
                            CommandArgument='<%# Eval("TvShowId") %>' CommandName="Apagar">               
               <img src="../images/delete.png" alt="" />               
                        </asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <HeaderStyle CssClass="HeaderStyle"></HeaderStyle>
            <PagerStyle CssClass="PagerStyle"></PagerStyle>
            <RowStyle CssClass="RowStyle"></RowStyle>
            <SelectedRowStyle CssClass="SelectedRowStyle"></SelectedRowStyle>
        </asp:GridView>
    </div>
    <asp:HiddenField ID="hfTvShowId" runat="server" Value="0" />
</asp:Content>
